import config from '../config/config';
import request from '../utils/request';


let service = {};

//贝壳兑换优惠券列表
service.couponsconchlist = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.couponsconchlist;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}

//贝壳兑换优惠券
service.getcouponsconch = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.getcouponsconch;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'PUT',
    success: res => {
      cb(res);
    }
  });
}

//贝壳兑换优惠券
service.sendconch = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.sendconch;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}
module.exports = service;